﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Lists;

namespace KiemKe
{
    public partial class FrmChooseFile : BasicForms.FrmOKCancel
    {
        public FrmChooseFile()
        {
            InitializeComponent();
        }

        private void FrmChooseKho_Load(object sender, EventArgs e)
        {
            if (DesignMode) return;
        }


        #region FileName property
        public string FileName
        {
            get
            {
                return txtFileName.Text;
            }
        }
        #endregion

        private void btnImportFromTextFile_Click(object sender, EventArgs e)
        {
            openFileDialog.Filter = "txt files (*.txt)|*.txt|All files (*.*)|*.*";
            openFileDialog.InitialDirectory = "C:";
            openFileDialog.Title = "Chọn file xuất ra bởi máy kiểm kê";
            DialogResult result = openFileDialog.ShowDialog();

            if (result == DialogResult.OK)
            {
                txtFileName.Text = openFileDialog.FileName;
            }
        }
    }
}
